<?php
/* 
* @Author: Jerry-chen
* @Date:   2014-07-09 12:27:33
* @Last Modified time: 2014-07-24 10:21:44
* @Last Modified by: Jerry-chen<uranusbill@163.com>
* @ Copyright (c) 2014 http://www.cooldreamer.com All rightsreserved.
*/

class CinemaModel extends Model
{
	//指定表
	public $table = 'cinema';
	/**
	 * [add_ 添加数据]
	 */
	public function add_()
	{
		return $this->add();
	}
	 /**
	  * [get_all 获得所有数据]
	  * @return [type] [description]
	  */
	public function get_all($where=null)
	{
		return $this->where($where)->all();
	}
	/**
	 * [get_one 获得一条数据]
	 * @param  [type] $where [description]
	 * @param  [type] $filed [description]
	 * @return [type]        [description]
	 */
	public function get_one($where)
	{
		return $this->where($where)->find();
	}
	/**
	 * [edit_ 修改]
	 * @return [type] [description]
	 */
	public function edit_($where)
	{
		$this->where($where)->save();
	}
	/**
	 * [del_ 删除]
	 * @return [type] [description]
	 */
	public function del_($where)
	{
		$this->where($where)->del();

	}
	/**
	 * [get_in in方法]
	 * @return [type] [description]
	 */
	public function get_in($in=null,$id=null,$field=null)
	{
		return $this->in($in)->order($id)->field($field)->get_all();
	}
}

?>
